package com.kaibes.web.feign;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class FeignExceptionHandler {

	@ExceptionHandler(value = FeignException.class)
    public ResponseEntity<Object> feignException(HttpServletRequest request, FeignException e) {
        return e.getEntity();
    }
	
}
